package com.hyhy.hycloud.uaa.security;

import org.springframework.security.authentication.AuthenticationDetailsSource;
import org.springframework.security.web.authentication.WebAuthenticationDetails;

import javax.servlet.http.HttpServletRequest;

/**
 * 登录请求详情数据源
 *
 * @author Xuegui Yuan
 * @date 2018-09-19
 */
public class LoginRequestDetailsSource implements
        AuthenticationDetailsSource<HttpServletRequest, WebAuthenticationDetails> {

    @Override
    public WebAuthenticationDetails buildDetails(HttpServletRequest context) {
        return new LoginRequestDetails(context);
    }
}
